//全选
function selAll(value) {
	if (value == 1) {
		for (i = 0; i < document.getElementsByName("sel").length; i++) {
			document.getElementsByName("sel")[i].checked = "checked";
		}
		document.getElementById("cal").value = 0;
	} else {
		selNone();
	}
}
		//反选
function selNone() {
	for (i = 0; i < document.getElementsByName("sel").length; i++) {
		if (document.getElementsByName("sel")[i].checked) {
			document.getElementsByName("sel")[i].checked = "";
		} else {
			document.getElementsByName("sel")[i].checked = "checked";
		}
	}
	document.getElementById("cal").value = 1;
}



//修改
function updateData() {
	var count = 0;
	for (i = 0; i < document.getElementsByName("sel").length; i++) {
		if(document.getElementsByName("sel")[i].checked) {
			count++;
		}
	}
	if(count > 1 || count <1) {
		alert("请选择一条记录");
		return false;
	}
}

